package com.sys.basics.dao;

import org.apache.ibatis.annotations.Mapper;
import com.sys.basics.entity.SysRoleResourceLk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: ares
 * @date: 2021-10-20
 * @description: 角色资源关联表 Mapper 接口
 */
@Mapper
public interface SysRoleResourceLkDao extends BaseMapper<SysRoleResourceLk> {

    List<SysRoleResourceLk> getLinkedResourceByRoleId(Long roleId);

    int batchCreate(@Param("roleId") Long roleId, @Param("resourceIds") List<Long> resourceIds);

    int batchRemove(@Param("roleId") Long roleId, @Param("resourceIds") List<Long> resourceIds);

    int removeByRoleId(@Param("roleId") Long roleId);
}
